<?php
?>
<html>
<head>
<script>
function validateForm()
{
	var x=document.forms["form1"]["myusername"].value;
	var match = /^\w+[@]hawaii[.]edu$/.test(x);
	if (match == false)
	{
	  alert("Username must be a valid hawaii.edu email address");
	  return false;
	}
	var y=document.forms["form1"]["mypassword"].value; 
	var match2 = /^[\w!"#$%&'()[\]*+,-./:;<=>?@\\^`{\|}~]{8,12}$/.test(y);
	if (match2 == false)
	{
	  alert("Password must be between 8 and 12 characters in length.");
	  return false;
	}	

}
</script>
</head>
<body>
<table width="600" border="0" align="middle" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" onsubmit="return validateForm()" action="register.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Account Registration</strong></td>
</tr>
<tr>
<td width="150">Email Address:</td>
<td width="10">:</td>
<td width="300"><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td>Password(8-12 characters)</td>
<td>:</td>
<td><input name="mypassword" type="password" id="mypassword"></td>
</tr>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Register"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
</body>
</html>